﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="viewDataLayerActieSite.aspx.cs" Inherits="Pc_Vision.View_Datalayer_Site.viewDataLayerActieSite" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <!-- #include file="load.aspx"  -->
</head>
<body>
    <!-- #include file="header.aspx" -->
<form runat="server">
<table>
     <tr><td style="width:300px;"><asp:Label ID="Label1" runat="server" Text="actieNaam:" /></td>
     <td><asp:Label ID="actieNaam" runat="server" Text="........." /></td></tr>

     <tr><td style="width:300px;"><asp:Label ID="Label2" runat="server" Text="startTijd:" /></td>
     <td><asp:Label ID="startTijd" runat="server" Text="........." /></td></tr>

     <tr><td style="width:300px;"><asp:Label ID="Label3" runat="server" Text="eindTijd:" /></td>
     <td><asp:Label ID="eindTijd" runat="server" Text="........." /></td></tr>

     <tr><td style="width:300px;"><asp:Label ID="Label6" runat="server" Text="percentageKorting:" /></td>
     <td><asp:Label ID="percentageKorting" runat="server" Text="........." /></td></tr>

     <asp:Button ID="Button1" Text="click" runat="server" OnClick="fn_GetActie" />
</table>

    <asp:Label ID ="lblProductValue" runat="server" />
    <asp:Label ID="lblActieValue" runat="server" />

    <asp:Button ID="btnCategorie" Text="...." runat="server" OnClick ="fn_GetCategories" />
    <asp:Button ID="btnActie" Text="...." runat="server" OnClick="fn_GetActies" />
    </form>
</body>
</html>

<script type="text/javascript">

    $(document).ready(function () {
        $('#btnCategorie').hide();
        $('#lblProductValue').hide();
        $('#lblActieValue').hide();
        $('#btnActie').hide();

        var checkProduct = localStorage.getItem('checkProduct');
        var checkActie = localStorage.getItem('checkActie');
        if (checkProduct == 'check') {
            if (checkActie == 'check') { }
            else {
                $('#btnActie').click();
            }
        }
        else { $('#btnCategorie').click(); } 

        var valueProduct = $('#lblProductValue').html();
        var valueActie = $('#lblActieValue').html();

        $('#ulProduct').append(valueProduct);
        $('#ulActie').append(valueActie);
    });

    $('#btnCategorie').click(function () {
        localStorage.setItem('checkProduct', 'check');
    });

    $('#btnActie').click(function () {
        localStorage.setItem('checkActie', 'check');
    });

    function fn_ClearLocal() {
        localStorage.clear();
    }

</script>